```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三数之和 | 算法精解</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .hero {
            background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
        }
        .code-block {
            background: #f8f9fa;
            border-left: 4px solid #6e8efb;
        }
        .card {
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
        }
        .highlight {
            background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
            background-repeat: no-repeat;
            background-size: 100% 40%;
            background-position: 0 88%;
        }
        .mermaid {
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero text-white py-20 px-4">
        <div class="max-w-4xl mx-auto text-center">
            <h1 class="text-4xl md:text-5xl font-bold mb-4 font-serif">三数之和</h1>
            <p class="text-xl md:text-2xl mb-8 font-serif">经典算法问题的优雅解法</p>
            <div class="inline-block bg-white text-purple-600 px-6 py-3 rounded-full font-medium shadow-lg transform hover:scale-105 transition-transform">
                <i class="fas fa-code mr-2"></i>探索算法之美
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <div class="max-w-4xl mx-auto px-4 py-12">
        <!-- Problem Section -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="w-12 h-12 bg-purple-100 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-question text-purple-600 text-xl"></i>
                </div>
                <h2 class="text-2xl font-bold text-gray-800">题目描述</h2>
            </div>
            <div class="card bg-white p-6 rounded-lg">
                <p class="text-gray-700 mb-4">给定一个包含 n 个整数的数组，判断数组中是否存在三个元素 a, b, c，使得 a + b + c = 0。找出所有满足条件且不重复的三元组。</p>
                <div class="bg-gray-100 p-4 rounded">
                    <p class="font-mono text-gray-800"><span class="font-semibold">示例：</span> 给定数组 [-1, 0, 1, 2, -1, -4]，满足要求的三元组为 [[-1, 0, 1], [-1, -1, 2]]</p>
                </div>
            </div>
        </section>

        <!-- Algorithm Section -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-brain text-blue-600 text-xl"></i>
                </div>
                <h2 class="text-2xl font-bold text-gray-800">核心考点与算法</h2>
            </div>
            <div class="grid md:grid-cols-2 gap-6">
                <div class="card bg-white p-6 rounded-lg">
                    <h3 class="text-xl font-semibold mb-4 text-gray-800">双指针技巧</h3>
                    <p class="text-gray-700 mb-4">通过固定一个元素，在剩余部分使用左右指针高效寻找符合条件的组合。</p>
                    <div class="flex items-center text-blue-500">
                        <i class="fas fa-arrow-right mr-2"></i>
                        <span>时间复杂度: O(n²)</span>
                    </div>
                </div>
                <div class="card bg-white p-6 rounded-lg">
                    <h3 class="text-xl font-semibold mb-4 text-gray-800">排序预处理</h3>
                    <p class="text-gray-700 mb-4">先对数组排序，既便于双指针操作，又能有效处理重复元素。</p>
                    <div class="flex items-center text-blue-500">
                        <i class="fas fa-arrow-right mr-2"></i>
                        <span>空间复杂度: O(1)</span>
                    </div>
                </div>
            </div>
        </section>

        <!-- Solution Section -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-lightbulb text-green-600 text-xl"></i>
                </div>
                <h2 class="text-2xl font-bold text-gray-800">解题思路</h2>
            </div>
            <div class="card bg-white p-6 rounded-lg">
                <ol class="list-decimal pl-6 space-y-4 text-gray-700">
                    <li class="highlight">对数组进行排序</li>
                    <li>遍历数组，固定当前元素 <code class="bg-gray-100 px-2 py-1 rounded">nums[i]</code></li>
                    <li>在 <code class="bg-gray-100 px-2 py-1 rounded">nums[i]</code> 右侧使用双指针 <code class="bg-gray-100 px-2 py-1 rounded">left</code> 和 <code class="bg-gray-100 px-2 py-1 rounded">right</code> 寻找和为 <code class="bg-gray-100 px-2 py-1 rounded">-nums[i]</code> 的组合</li>
                    <li class="highlight">跳过重复元素以确保结果唯一</li>
                    <li>根据当前和与目标值的关系移动指针</li>
                </ol>
            </div>
        </section>

        <!-- Visualization -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="w-12 h-12 bg-orange-100 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-project-diagram text-orange-600 text-xl"></i>
                </div>
                <h2 class="text-2xl font-bold text-gray-800">算法可视化</h2>
            </div>
            <div class="card bg-white p-6 rounded-lg">
                <div class="mermaid">
                    graph TD
                        A[排序数组] --> B[遍历数组]
                        B --> C{是否与前一个元素相同?}
                        C -->|是| D[跳过]
                        C -->|否| E[初始化双指针]
                        E --> F[计算三数之和]
                        F --> G{和是否为0?}
                        G -->|是| H[记录结果]
                        G -->|小于0| I[左指针右移]
                        G -->|大于0| J[右指针左移]
                        H --> K[跳过重复元素]
                </div>
            </div>
        </section>

        <!-- Code Section -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="w-12 h-12 bg-indigo-100 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-code text-indigo-600 text-xl"></i>
                </div>
                <h2 class="text-2xl font-bold text-gray-800">示例代码</h2>
            </div>
            <div class="card bg-white rounded-lg overflow-hidden">
                <div class="bg-gray-800 text-white px-4 py-2 flex items-center">
                    <div class="flex space-x-2 mr-4">
                        <span class="w-3 h-3 rounded-full bg-red-500"></span>
                        <span class="w-3 h-3 rounded-full bg-yellow-500"></span>
                        <span class="w-3 h-3 rounded-full bg-green-500"></span>
                    </div>
                    <span class="text-sm">threeSum.py</span>
                </div>
                <div class="code-block p-6 overflow-x-auto">
                    <pre><code class="language-python text-sm md:text-base">def threeSum(nums):
    nums.sort()
    result = []
    for i in range(len(nums)-2):
        if i > 0 and nums[i] == nums[i-1]:
            continue
        left, right = i + 1, len(nums) - 1
        while left < right:
            curr_sum = nums[i] + nums[left] + nums[right]
            if curr_sum == 0:
                result.append([nums[i], nums[left], nums[right]])
                while left < right and nums[left] == nums[left+1]:
                    left += 1
                while left < right and nums[right] == nums[right-1]:
                    right -= 1
                left += 1
                right -= 1
            elif curr_sum < 0:
                left += 1
            else:
                right -= 1
    return result</code></pre>
                </div>
            </div>
        </section>

        <!-- Key Points -->
        <section class="mb-16">
            <div class="flex items-center mb-6">
                <div class="w-12 h-12 bg-pink-100 rounded-full flex items-center justify-center mr-4">
                    <i class="fas fa-key text-pink-600 text-xl"></i>
                </div>
                <h2 class="text-2xl font-bold text-gray-800">关键要点</h2>
            </div>
            <div class="grid md:grid-cols-3 gap-4">
                <div class="card bg-white p-5 rounded-lg border-l-4 border-blue-500">
                    <h3 class="font-semibold mb-2 text-gray-800">排序优化</h3>
                    <p class="text-sm text-gray-600">排序使双指针法成为可能，同时便于跳过重复元素</p>
                </div>
                <div class="card bg-white p-5 rounded-lg border-l-4 border-green-500">
                    <h3 class="font-semibold mb-2 text-gray-800">去重技巧</h3>
                    <p class="text-sm text-gray-600">检查当前元素与前一元素是否相同，避免重复结果</p>
                </div>
                <div class="card bg-white p-5 rounded-lg border-l-4 border-purple-500">
                    <h3 class="font-semibold mb-2 text-gray-800">指针移动</h3>
                    <p class="text-sm text-gray-600">根据当前和与0的关系智能移动指针</p>
                </div>
            </div>
        </section>
    </div>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```